<%@ page import="cn.io0288.blog2.db.Logs" %>
<%@ page import="static cn.io0288.blog2.utils.DateUtils.timeStamp2Date" %>
<%@ page import="static cn.io0288.blog2.utils.DateUtils.timeStamp2Day" %>
<%@ page import="cn.io0288.blog2.model.Log" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="row">
    <div class="text col-8">
        <ul class="timeline">
            <% for (Log log : Logs.getLogs()) { %>
            <li>
                <div class="line"></div>
                <section class="body">
                    <time class="time"><%=timeStamp2Date(Long.valueOf(log.date))%>
                    </time>
                    <p class="content"><%=log.uid%><%=log.operate%>了<%=log.atitle%>
                    </p>
                </section>
            </li>
            <% } %>
        </ul>
        <div class="dataDiv">
            <div class="data ">
                <div class="fontStyle">
                    <img src="<c:url value="/img/admin/警告.svg"/>" alt="">
                    <span class="span">数据统计</span>
                </div>
                <div class="dataContent col-4">
                    <div class="part">
                        <div class="content1">
                            运行天数
                            <p>${timeStamp2Day(System.currentTimeMillis()/1000 - initParam.START_DATE)}天</p>
                            当前分类总记录数
                        </div>
                        <div class="content1">
                            更新次数
                            <p>null</p>
                            当前分类总记录数
                        </div>
                    </div>
                    <div class="part">
                        <div class="content1">
                            浏览总量
                            <p>null</p>
                            当前分类总记录数
                        </div>
                        <div class="content1">
                            文章总量
                            <p>null</p>
                            当前分类总记录数
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="dataDiv">
            <div class="data">
                <div class="fontStyle">
                    <img src="<c:url value="/img/admin/窗口.svg"/>" alt="">
                    <span class="span">快捷入口</span>
                </div>
                <div class="dataContent col-4">
                    <div class="part2">
                        <a href="/adminArticleList">
                            <div class="content2">
                                <img src="<c:url value="/img/admin/back.svg"/>" alt="" class="back">
                            </div>
                            <div class="text-center">文章管理</div>
                        </a>
                        <div>
                            <a href="/adminDeleteAll">
                                <div class="content2">
                                    <img src="<c:url value="/img/admin/gear-wide-connected.svg"/>" alt="" class="back">
                                </div>
                                <div class="text-center">删除所有文章</div>
                            </a>
                        </div>
                        <div>
                            <a href="/">
                                <div class="content2">
                                    <img src="<c:url value="/img/admin/window-fullscreen.svg"/>" alt="" class="back">
                                </div>
                                <div class="text-center">博客主页</div>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="col">
        <div class="public">
            <div class="bell">
                <img src="<c:url value="/img/admin/公告.svg"/>" alt="">
                <span class="span">系统设置</span>
            </div>
            <div class="list">
                <table>
                    <tr>
                        <td style="padding-left: 15px;">修改密码</td>
                        <td style="padding-right: 15px;" class="Td1">
                            <a href="/updatepwd">
                                <button type="button" class="btn btn-primary btn-sm">
                                    点击查看
                                </button>
                            </a>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-left: 15px;">新增404页面</td>
                        <td style="padding-right: 15px;" class="Td1">
                            <button type="button" class="btn btn-primary btn-sm" data-toggle="modal"
                                    data-target="#myModal">
                                点击查看
                            </button>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-left: 15px;">修改模块展开样式</td>
                        <td style="padding-right: 15px;" class="Td1">
                            <button type="button" class="btn btn-primary btn-sm" data-toggle="modal"
                                    data-target="#myModal">
                                点击查看
                            </button>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-left: 15px;">修改图表样式</td>
                        <td style="padding-right: 15px;" class="Td1">
                            <button type="button" class="btn btn-primary btn-sm" data-toggle="modal"
                                    data-target="#myModal">
                                点击查看
                            </button>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-left: 15px;">修复链接错误</td>
                        <td style="padding-right: 15px;" class="Td1">
                            <button type="button" class="btn btn-primary btn-sm" data-toggle="modal"
                                    data-target="#myModal">
                                点击查看
                            </button>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="version">
            <div class="brush">
                <img src="<c:url value="/img/admin/版本信息.svg"/>" alt="">
                <span class="span">版本信息</span>
            </div>
            <div class="table">
                <table>
                    <tr style="cursor: default;">
                        <td class="td">博客名称</td>
                        <td>${initParam.AppName}</td>
                    </tr>
                    <tr style="cursor: default;">
                        <td class="td">当前版本</td>
                        <td>${initParam.APP_VERSION}</td>
                    </tr>
                    <tr style="cursor: default;">
                        <td class="td">主要特色</td>
                        <td>清爽/简洁</td>
                    </tr>
                    <tr style="cursor: default;">
                        <td class="td">演示地址</td>
                        <td>
                            <a href="https://blog2.ali,io0288.cn">点击查看</a>
                        </td>
                    </tr>
                    <tr style="cursor: default;">
                        <td class="td">Gitee</td>
                        <td><img src="<c:url value="/img/admin/gitee.svg"/>" alt=""><a
                                href="https://gitee.com/IO0288/Study_J2EE_Blog-2">点击查看</a></td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>